package com.deco.back.controller;

import com.deco.domain.vo.sys.CmsUserVo;
import org.apache.shiro.SecurityUtils;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;

@Controller
@RequestMapping(value="/admin")
public class WelcomeController {
	 /**
     * View视图
     */
    @RequestMapping(value="/index")
    public ModelAndView index() {
        ModelAndView modelAndView = new ModelAndView();
        CmsUserVo userVo = (CmsUserVo)SecurityUtils.getSubject().getPrincipal();
        modelAndView.addObject("userName",userVo.getUserName());
        modelAndView.setViewName("index");
        return modelAndView;
    }
}
